@import '@styles/color.scss';

.spining-nested {
  position: relative;
}

.spining-container {
  transition: opacity 0.3s;
  &.spining-blur {
    opacity: 0.5;
  }
}

.spining-mask {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 8;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.4);
  transition: opacity 0.3s;
  &.hidding {
    opacity: 0;
  }
  & > .spining-text {
    color: $primary-color;
  }
  & > .spining-icon {
    margin-bottom: 8px;
    &.blizzard {
      position: relative;
      width: 50px;
      height: 50px;
      & > i {
        position: absolute;
        box-sizing: border-box;
        border-radius: 50%;
        width: 100%;
        height: 100%;

        &:nth-of-type(1) {
          top: 0;
          left: 0;
          border-bottom: 3px solid $primary-color;
          animation: mtBlzSpinFirst 1s infinite linear;
        }

        &:nth-of-type(2) {
          top: 0;
          right: 0;
          border-right: 3px solid $primary-color;
          animation: mtBlzSpinSecond 1s infinite linear;
        }

        &:nth-of-type(3) {
          right: 0;
          bottom: 0;
          border-top: 3px solid $primary-color;
          animation: mtBlzSpinThird 1s infinite linear;
        }
      }
    }
  }
}

@keyframes mtBlzSpinFirst {
  0% {
    transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg);
  }

  100% {
    transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg);
  }
}

@keyframes mtBlzSpinSecond {
  0% {
    transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg);
  }

  100% {
    transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg);
  }
}

@keyframes mtBlzSpinThird {
  0% {
    transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg);
  }

  100% {
    transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg);
  }
}
